class PhoneDirectory(object):

    def __init__(self, maxNumbers):
        """
        :type maxNumbers: int
        """
        self.phone = {i for i in range(maxNumbers)}

    def get(self):
        """
        :rtype: int
        """
        return self.phone.pop()

    def check(self, number):
        """
        :type number: int
        :rtype: bool
        """
        return number in self.phone


    def release(self, number):
        """
        :type number: int
        :rtype: None
        """
        self.phone.add(number)